package com.songtech.base.universal.dao.util;

import java.io.IOException;

import org.springframework.core.io.Resource;
import org.springframework.core.io.support.ResourcePatternResolver;

public class GetBaseResource {
	/**
	 * 加载核心dao的资源文件
	 * @param resolver
	 * @return
	 */
	public static Resource[] getResource(ResourcePatternResolver resolver){
		Resource[] resource = null;
		try {
			resource = resolver.getResources("classpath:com/songtech/base/universal/dao/**/*.xml");
		} catch (IOException e) {
			e.printStackTrace();
		}
		return resource == null ? new Resource[0] : resource;
	}
}
